<%@page import="sedev.shopping.entities.ThongTinShop"%>
<%@page import="sedev.shopping.entities.ListPhamVi"%>
<%@include file="../../../init.jsp" %>
<%@include file="../script.jsp" %>
<%
	ThongTinShop thongtinshop = (ThongTinShop)request.getAttribute("thongtinshop");
	ListPhamVi listphamvi = (ListPhamVi)request.getAttribute("listphamvi");
%>
<div class="menu-box">
	<%@include file="../menu.jsp" %>
</div>
<div id="content-box">
	<div class="padding">
		<div id="toolbar-box">
	    	<div class="t">
	        	<div class="t">
	        		<div class="t"></div>
	        	</div>
	       	</div>
	       	<div class="m">
	        	<div id="toolbar" class="toolbar">
	            	<table class="toolbar">
	                	<tbody>
	                    	<tr>
	                       		<td id="toolbar-apply" class="button">
	                       			<a class="toolbar" href="javascript:void(0)" onclick="shopping.postFormInfoShop('adminform')">
										<span title="Apply" class="icon-32-apply">
										</span>
										<liferay-ui:message key="label-apply" />
								   	</a>
								</td>
	                       	</tr>
	                   	</tbody>
	               	</table>
	           	</div>
	           	<div class="header icon-48-article">
	            	<liferay-ui:message key="label-update-info-shop" />
	           	</div>
				<%
				Integer errorCode = (Integer)request.getAttribute("errorCode");
				if(errorCode!=null ){%>
					<dl id="system-message">
					    <%if(errorCode < 0){%>
					    <dd class="error message fade">
						    <ul>
						        <li><liferay-ui:message key="label-execute-error" /></li>
						    </ul>
						</dd>
						
					<%}else{%>
						<dd class="message message fade">
						    <ul>
						        <li><liferay-ui:message key="label-execute-success" /></li>
						    </ul>
						</dd>
					<%}%>
					</dl>
				<%}%>	           	
	           	<div class="clr"></div>
	       	</div>
	       	<div class="b">
	           	<div class="b">
	               	<div class="b"></div>
	           	</div>
	       	</div>
	 	</div>
	    <div id="element-box">
	        <div class="t">
	           <div class="t">
	               <div class="t"></div>
	           </div>
	        </div>
	        <div class="m">
	            <form action='<s:url action="updateInfoShop"></s:url>' method="post" id="adminform" name="adminform">
				    <table width="100%">
				        <tr>
				            <td width="15%">
				                <label><liferay-ui:message key="label-shop-name" />* :</label>
				            </td>
				            <td>
				                <input id="title" type="text" name="title" value="<%=thongtinshop.getTenShop() %>" size="50" maxlength="255"/>
				            </td>				            
				        </tr>
				        <tr>
				            <td width="15%">
				                <label><liferay-ui:message key="label-shop-slogan" />* :</label>
				            </td>
				            <td>
				                <input id="slogan" type="text" name="slogan" value="<%=thongtinshop.getSlogan() %>" size="50" maxlength="255"/>
				            </td>				            
				        </tr>
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-shop-location" />* :</label>
				            </td>
				            <td>
				                <select id="location" name="location">
				                	<option value='0'><liferay-ui:message key="label-choose-location" /></option>
				                	<%if(listphamvi!=null && listphamvi.size()>0) {
				                		for(int index=0; index<listphamvi.size(); ++index){%>
				                			<option value='<%=listphamvi.get(index).getId()%>'><%=listphamvi.get(index).getTen() %></option>
				                		<%}
				                	}%>
				                </select>
				                <script type="text/javascript">
				                	//select location
				                	sedev.selectOptionByValue("location", <%= thongtinshop.getPhamViId()%>);
				                </script>
				            </td>				            
				        </tr>
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-shop-address" /> :</label>
				            </td>
				            <td>
				                <input id="address" type="text" name="address" value="<%=thongtinshop.getDiaChi() %>" size="50" maxlength="255"/>
				            </td>
				        </tr>
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-owner-name" /> * :</label>
				            </td>
				            <td>				           
				                <input id="ownername" type="text" name="ownername" value="<%=thongtinshop.getChuShop() %>" size="50" maxlength="255"/>
				            </td>
				        </tr>
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-owner-email" />* :</label>
				            </td>
				            <td>
				                <input id="email" type="text" name="email" value="<%=thongtinshop.getEmail() %>" size="50" maxlength="255"/>
				            </td>
				        </tr>
				        <tr>
				            <td>
				                <label><liferay-ui:message key="label-owner-phone" /> :</label>
				            </td>
				            <td>
				                <input id="phone" type="text" name="phone" value="<%=thongtinshop.getPhone() %>" size="50" maxlength="255"/>
				            </td>
				        </tr>
				    </table>
				    <input type="hidden" value="<%=thongtinshop.getId()%>" name="id"/>		    
				</form>
	        </div>
	        <div class="b">
	           <div class="b">
	               <div class="b"></div>
	           </div>
	        </div>
	    </div>
	</div>
</div>